<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="0" />
<base target="_self">
	<title>帐号管理</title> <script>
		function retrunValue() {
			var $item = $("input[name='radio']:checked").val();
			var $item1 = $("input:checked").attr("id");
			var $math = $item1.substring(5, 6);
			var $orgName = $("#name" + $math).html();
			var $name = $("#username" + $math).html();
			window.returnValue = {
				id : $item,
				username : $name,
				name : $orgName
			};
			window.close();
		}
	</script>
</head>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<body>
	<!-- 直接主体内容开始  无需要涉及页面布局的  div 等   注意各页面中的Id 保持一致  页面中尽量用 el表达式 与html标签->
<!--   form定义 类似如下:  注意各页面中的Id 保持一致-->
	<form id="mainForm" action="user.action" method="get" class="sForm">
		<input type="hidden" name="page.pageNo" id="pageNo"
			value="${page.pageNo}" /> <input type="hidden" name="page.orderBy"
			id="orderBy" value="${page.orderBy}" /> <input type="hidden"
			name="page.order" id="order" value="${page.order}" />
		<div id="message">
			<s:actionmessage theme="custom" cssClass="success" />
		</div>
		<div id="filter" align="left">
			登录名: <input type="text" name="filter_EQS_userName"
				value="${param['filter_EQS_loginName']}" size="9" /> 姓名或Email: <input
				type="text" name="filter_LIKES_name_OR_email"
				value="${param['filter_LIKES_name_OR_email']}" size="9" /> <input
				type="button" value="搜索" id="search" onclick="search();" />
		</div>
		<div id="content">
			<table id="contentTable">
				<tr>
					<th>选择</th>
					<th>用户名</th>
					<th><a href="javascript:sort('name','asc')">姓名</a>
					</th>
					<th><a href="javascript:sort('email','asc')">电邮</a>
					</th>
					<th>角色</th>
				</tr>

				<c:forEach items="${page.result }" var="user" varStatus="var">
					<tr>
						<td><input type="radio" name="radio" id="radio${var.count }"
							value="<c:out value='${user.id}'/>" /></td>
						<td id="username${var.count }">${user.userName}</td>
						<td id="name${var.count }">${user.name}</td>
						<td>${user.email}&nbsp;</td>
						<td>${user.roleNames}&nbsp;</td>
					</tr>
				</c:forEach>
			</table>
			<div class="type-button">
				<input type="button" onclick="retrunValue()" class="submit" value="提交" /><input
					type="button" onclick="JavaScript:window.close();" class="reset" value="关闭" />
			</div>
		</div>

		<div id="pagebar">
			第${page.pageNo}页, 共${page.totalPages}页 <a
				href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre">
				<a href="javascript:jumpPage(${page.prePage})">上一页</a>
			</s:if>
			<s:if test="page.hasNext">
				<a href="javascript:jumpPage(${page.nextPage})">下一页</a>
			</s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		</div>
	</form>
</body>
</html>
